﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lichtspiel.Math
{
    public struct Size
    {
        public int Width;
        public int Height;

        public Size(int width, int height) {
            this.Width = width;
            this.Height = height;
        }

        public static explicit operator SizeF(Size s) {
            return new SizeF(s.Width, s.Height);
        }

        public static Size operator *(Size s, float f) {
            return new Size((int) (s.Width * f), (int) (s.Height * f));
        }

        public static Size operator *(float f, Size s) {
            return new Size((int) (s.Width * f), (int) (s.Height * f));
        }

        public static Size operator /(Size s, float scale) {
            float mult = 1.0f / scale;
            s.Width = (int) (s.Width * mult);
            s.Height = (int) (s.Height * mult);
            return s;
        }
    }
}